home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / em-xmkit.zip / EMM19_C.ASM < prev    next >
Assembly Source File  |  1989-11-29  |  4KB  |  83 lines

  1. ;-----------------------------------------------------------------------------;
  2. ;      MODULE NAME:   EMM19_C.ASM                                             ;
  3. ;                                                                             ;
  4. ;    FUNCTION NAME:   get_attrib_capability                                   ;
  5. ;                                                                             ;
  6. ;      DESCRIPTION:   This function can be used to determine whether the      ;
  7. ;                     memory manager can support the non-volatile attribute.  ;
  8. ;                     (Read EMMLIB25.ASM or EMMLIB26.ASM for more information ;
  9. ;                     about handle attributes.)                               ;
  10. ;                                                                             ;
  11. ;           PASSED:   &attrib_capability:                                     ;
  12. ;                        is a far pointer to the memory managers attribute    ;
  13. ;                        capability.                                          ;
  14. ;                                                                             ;
  15. ;         RETURNED:   status:                                                 ;
  16. ;                        is the status EMM returns from the call.  All other  ;
  17. ;                        returned results are valid only if the status        ;
  18. ;                        returned is zero.  Otherwise they are undefined.     ;
  19. ;                                                                             ;
  20. ;                     attrib_capability:                                      ;
  21. ;                        is the memory manager handle attribute capability.   ;
  22. ;                        A value of zero indicates that the memory manager    ;
  23. ;                        and hardware supports only volatile handles.  A      ;
  24. ;                        value of one indicates that the memory               ;
  25. ;                        manager/hardware supports both volatile and          ;
  26. ;                        non-volatile handles.                                ;
  27. ;                                                                             ;
  28. ; C USE CONVENTION:   unsigned int status;                                    ;
  29. ;                     unsigned int attrib_capability;                         ;
  30. ;                                                                             ;
  31. ;                     status = get_attrib_capability (&attrib_capability);    ;
  32. ;-----------------------------------------------------------------------------;
  33. .XLIST
  34. PAGE    60,132
  35.  
  36. IFDEF SMALL
  37.    .MODEL SMALL, C
  38. ENDIF
  39. IFDEF MEDIUM
  40.    .MODEL MEDIUM, C
  41. ENDIF
  42. IFDEF LARGE
  43.    .MODEL LARGE, C
  44. ENDIF
  45. IFDEF COMPACT
  46.    .MODEL COMPACT, C
  47. ENDIF
  48. IFDEF HUGE
  49.    .MODEL HUGE, C
  50. ENDIF
  51.  
  52. INCLUDE emmlib.equ
  53. INCLUDE emmlib.str
  54. INCLUDE emmlib.mac
  55. .LIST
  56. .CODE
  57.  
  58. get_attrib_capability    PROC    ptr_attrib_capability:FAR PTR WORD
  59.  
  60.     ;---------------------------------------------------------------------;
  61.     ;   do;                                                               ;
  62.     ;   .   get EMMs handle attribute capabilities;                       ;
  63.     ;---------------------------------------------------------------------;
  64.     MOVE        AX, get_attrib_capability_fcn
  65.     INT         EMM_int
  66.  
  67.     ;---------------------------------------------------------------------;
  68.     ;   .   pass the handle attribute capability back to the caller;      ;
  69.     ;---------------------------------------------------------------------;
  70.     MOVE        DH:DL, 0:AL
  71.     MOVE        ES:BX, ptr_attrib_capability
  72.     MOVE        ES:[BX], DX
  73.  
  74.     ;---------------------------------------------------------------------;
  75.     ;   .   return (EMM status);                                          ;
  76.     ;   end;                                                              ;
  77.     ;---------------------------------------------------------------------;
  78.     RET_EMM_STAT    AH
  79.  
  80. get_attrib_capability    ENDP
  81.  
  82. END
  83.